import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Home from '@/pages/Home'
import Login from '@/pages/Login'
import NotFound from '@/pages/404'

import orderCheck from '@/pages/children/orderCheck'
import orderManage from '@/pages/children/orderManage'

// import entryList from '@/pages/children/entryList'
// import entryMine from '@/pages/children/entryMine'
import unauthEntry from '@/pages/children/unauthEntry'

// import offList from '@/pages/children/offList'
// import offMine from '@/pages/children/offMine'
import unauthDown from '@/pages/children/unauthDown'


// import checkWill from '@/pages/children/checkWill'
// import checkOver from '@/pages/children/checkOver'

import userEntry from '@/pages/children/userEntry'

import userManage from '@/pages/children/userManage'

Vue.use(Router)
const scrollBehavior = (to, from, savedPosition) => {
	if (savedPosition) {
		return savedPosition
	} else {
		return { x: 0, y: 0 }
	}
}
export default new Router({
	// mode: 'history', // 去掉'#'号
	// linkActiveClass: 'active',
	base: __dirname,
	scrollBehavior,
	routes: [
		{
			path: '/login',
			component: Login,
			hidden: true
		},
		{
			path: '/404',
			component: NotFound,
			hidden: true
		},
		{
			path: '/',
			component: Home,
			redirect: '/index',
			name: '版权监测管理',
			iconCls: 'order',
			// leaf: true,//只有一个节点
			right_id: '2',
			children: [
				{ path: '/index', component: orderCheck, name: '监测需求审核' },
				{ path: '/orderManage', component: orderManage, name: '监测订单管理' }
			]
		},
		{
			path: '/',
			component: Home,
			iconCls: 'supplier',
			// name: '盗版录入管理',
			leaf: true,//只有一个节点
			right_id: '3',
			children: [
				{ path: '/unauthEntry', component: unauthEntry, name: '盗版录入管理' },
				// { path: '/entryList', component: entryList, name: '录入列表' },
				// { path: '/entryMine', component: entryMine, name: '我的录入' }
			]
		},
		{
			path: '/',
			component: Home,
			iconCls: 'product',
			// name: '盗版下架管理',
			leaf: true,//只有一个节点
			right_id: '4',
			children: [
				{ path: '/unauthDown', component: unauthDown, name: '盗版下架管理'},
				// { path: '/offList', component: offList, name: '下架列表'},
				// { path: '/offMine', component: offMine, name: '我的下架录入'}
			],
		},
		
		{
			path: '/',
			component: Home,
			iconCls: 'shop',
			// name: '用户录入审核',
			leaf: true,//只有一个节点
			right_id: '5',
			children: [
				{ path: '/userEntry', component: userEntry, name: '用户录入审核' },
				// { path: '/checkWill', component: checkWill, name: '待审核' },
				// { path: '/checkOver', component: checkOver, name: '已审核' }
			],
		},
		

		{
			path: '/',
			component: Home,
			iconCls: 'attribute',
			leaf: true,//只有一个节点
			right_id: '1',
			children: [
				{ path: '/userManage', component: userManage, name: '用户管理' }
			]
		},
		{
			path: '*',
			hidden: true,
			redirect: { path: '/404' }
		}
	]
})
